<template>
  <div id="RebuildPanelV2" :class="{ smallFontSize: showEdition, mediumFontSize: !showEdition }">
    <div class="content">
      <div class="tab">
        <ul>
          <li v-for="(item, index) in tabData" :key="index" :class="{ select: nowIndex === index }"
            @click="tabClick(index)">
            <span :class="{
              smallFontSize: showEdition,
              mediumFontSize: !showEdition
            }">{{ item }}</span>
          </li>
        </ul>
      </div>
      <div class="list">
        <div style="height: 45px;">
          <p style="color: #007aff;width: 40%;display: inline-block;padding: 10px 0;font-size: 20px;font-weight: bold;">
            申请人信息</p>
        </div>
        <div>
          <div style="clear: both"></div>
        </div>
        <div v-if="nowIndex === 1">
          <p style="color: #5d5d5d; padding: 10px 0">
            <span style="color: #ff0000">*</span> 请拍摄并上传代办人的有效身份证
          </p>
          <div>
            <div style="width: 50%; float: left; text-align: center">
              <van-uploader v-model="fileList" :after-read="afterRead" :max-count="1">
                <template default>
                  <img src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/ZLJ/positive0.png" width="180"
                    alt="" />
                </template>
              </van-uploader>
              <p :style="{ fontSize: showEdition ? '12px' : '14px' }">点击上传带头像的一面</p>
            </div>
            <div style="width: 50%; float: left; text-align: center">
              <van-uploader v-model="fileList1" :after-read="afterRead1" :max-count="1">
                <template default>
                  <img src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/ZLJ/positive1.png" width="180"
                    alt="" />
                </template>
              </van-uploader>
              <p :style="{ fontSize: showEdition ? '12px' : '14px' }">点击上传带国徽的一面</p>
            </div>
          </div>
          <div style="clear: both"></div>
        </div>
        <van-form validate-first :class="{ smallFontSize: showEdition, mediumFontSize: !showEdition }">
          <template v-if="nowIndex === 1">
            <div class="formStyle">
              <span style="color: #ff0000">*</span>
              <van-field v-model="formDataNew.agentName" :readonly="isreadonsly2" label="代办人姓名" placeholder="请填写代办人姓名" />
            </div>
            <div class="formStyle">
              <span style="color: #ff0000">*</span>
              <van-field  v-model="formDataNew.agentPhone" label="代办人联系电话" :readonly="isreadonsly2"
                placeholder="请输入代办人联系电话" name="pattern" />
            </div>
            <div class="formStyle">
              <span style="color: #ff0000">*</span>
              <van-field v-model="formDataNew.agentIdcard" label="代办人身份证号" :readonly="isreadonsly2"
                placeholder="请输入代办人身份证号" name="validator" />
            </div>
          </template>
          <div class="formStyle" style="color: black">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataNew.applyUser" :readonly="isreadonsly1" placeholder="请输入申请人姓名" label="户主姓名"
              :rules="[{ required: true, message: '请填写申请人姓名' }]" />
          </div>
          <div class="formStyle">
            <span style="color: #ff0000">*</span>
            <van-field v-model="formDataNew.applyIdcard" label="身份证号码" :readonly="isreadonsly1" name="validator"
              @blur.native.capture="handleGetCityData" placeholder="身份证号码"
              :rules="[{ validator, message: '请输入正确身份证号码' }]" />
          </div>
          <div class="formStyle">
            <van-field placeholder="请输入手机号码" :readonly="isreadonsly1" v-model="formDataNew.applyPhone" label="手机号"
              name="pattern" />
          </div>
          <div style="height: 45px;">
            <p style="color: #007aff;width: 40%;display: inline-block;padding: 10px 0;font-size: 20px;font-weight: bold;">
              房屋信息</p>
            <!-- <p style="color: #007aff; padding: 4px;margin-top: 10px; float: right;background: #D1E3FF;cursor: pointer;font-size: 14px;" @click="getJDFWdata">获取房屋信息</p> -->
          </div>
          <div class="formStyle">
            <span style="color: #ff0000">*</span>
            <van-field readonly clickable name="picker" :value="ValueCity" label="所属市" placeholder="请选择所属市"
              @change="getXianOpenDataView" @click="selectDataDisabled ? showPickerC = false : showPickerC = true"
              :rules="[{ required: true, message: '请选择所属市' }]" />
            <van-popup v-model="showPickerC" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="CityColumns" value-key="cityname" @confirm="onConfirmCity"
                @cancel="showPickerC = false" />
            </van-popup>
          </div>
          <div class="formStyle">
            <span style="color: #ff0000">*</span>
            <van-field clickable readonly name="picker" :value="valueXian" label="所属县(区)" placeholder="请选择所属县(区)"
              @click="selectDataDisabled ? showPickerX = false : showPickerX = true" />
            <van-popup v-model="showPickerX" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="XianColumns" value-key="cityname" @confirm="onConfirmXian"
                @cancel="showPickerX = false" />
            </van-popup>
          </div>
          <div class="formStyle">
            <span style="color: #ff0000">*</span>
            <van-field readonly clickable name="picker" :value="valueZhen" label="所属镇" placeholder="请选择所属镇"
              @click="selectDataDisabled ? showPickerT = false : showPickerT = true" />
            <van-popup v-model="showPickerT" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="TownColumns" value-key="cityname" @confirm="onConfirmTown"
                @cancel="showPickerT = false" />
            </van-popup>
          </div>
          <div class="formStyle">
            <span style="color: #ff0000">*</span>
            <van-field readonly clickable name="picker" :value="valueCun" label="所属村" placeholder="请选择所属村"
              @click="selectDataDisabled ? showPickerCun = false : showPickerCun = true" />
            <van-popup v-model="showPickerCun" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="CunColumns" value-key="cityname" @confirm="onConfirmCun"
                @cancel="showPickerCun = false" />
            </van-popup>
          </div>
          <div class="formStyle">
            <span style="color: #ff0000">*</span>
            <van-field :readonly="selectDataDisabled" placeholder="请输入详细地址" v-model="formDataNew.detailAddress"
              label="详细地址" name="pattern" />
          </div>
          <div class="formStyle">
            <!-- <span style="color: #FF0000;">*</span> -->
            <van-field :readonly="selectDataDisabled" placeholder="请输入建筑层数" v-model="formDataNew.buildFloor" type="number"
              label="建筑层数" name="pattern" />层
          </div>
          <!-- <div class="formStyle">
            <van-field readonly clickable name="datetimePicker" v-model="formDataNew.buildYear" label="建造年份"
              placeholder="请选择建造年份" @click="selectDataDisabled?showPickerN = false:showPickerN = true" />
            <van-popup v-model="showPickerN" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="yearsToNow" @confirm="onConfirmN" @cancel="showPickerN = false" />
            </van-popup>
          </div> -->
          <div>
          </div>
          <div style="height: 45px;">
            <p style="color: #007aff;width: 40%;display: inline-block;padding: 10px 0;font-size: 20px;font-weight: bold;">
              鉴定整治信息</p>
            <!-- <p style="color: #007aff; padding: 4px;margin-top: 10px; float: right;background: #D1E3FF;cursor: pointer;font-size: 14px;" @click="getJDFWdata">获取房屋信息</p> -->
          </div>
          <div class="formStyle">
            <span style="color: #ff0000">*</span>
            <van-field readonly clickable name="picker" :value="formDataNew.usccName" label="鉴定机构名称" placeholder="请选择鉴定机构"
              @click="getJDFWdata()" />
            <!-- <van-popup v-model="showPickerCun" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="CunColumns" value-key="cityname" @confirm="onConfirmCun"
                @cancel="showPickerCun = false" />
            </van-popup> -->
          </div>
          <div class="formStyle">
            <van-field :readonly="selectDataDisabled" placeholder="请输入统一社会信用代码" v-model="formDataNew.uscc" type="number"
              label="统一社会信用代码" name="pattern" />
          </div>
          <div class="formStyle">
            <span style="color: #ff0000">*</span>
            <van-field readonly clickable name="picker" :value="removeDangerMode" label="整治方式" placeholder="请选择整治方式"
              @click="selectDataDisabled ? showPickerZZFS = false : showPickerZZFS = true" />
            <van-popup v-model="showPickerZZFS" position="bottom" get-container="#popup">
              <van-picker show-toolbar :columns="ZZFS" value-key="name" @confirm="onConfirmZZFS"
                @cancel="showPickerZZFS = false" />
            </van-popup>
          </div>
        </van-form>
      </div>
    </div>

    <div>
      <!-- <div :style="{ fontSize: showEdition ? '12px' : '14px' }" class="bottomText">请确保资料真实有效，我们会第一时间受理您的危房申请</div> -->
      <div class="bottomBtn" @click="SaveData">提交</div>
    </div>
    <!-- <van-dialog v-model="showDialogWXTS" title="温馨提示" @confirm="confirm" confirmButtonColor="#000">
      <span style="display: inline-block; width: 100%; text-align: center; padding: 10px">
        当前申请人非户籍户主,请户籍户主本人发起危改申请流程或在 “<span style="color: #3f8ffc">为他人待办</span>” 模块为户主发起待办</span>
    </van-dialog> -->
    <van-popup v-model="showJDFW" position="bottom" :style="{ height: '67%' }">
      <div style="height: 45px;line-height: 45px;text-align: center;border-bottom: 1px solid #ccc;">鉴定机构</div>
      <div style="padding: 4px">
        <van-search v-model="QYMC" style="border-radius: 10px; height: 44px" background="#f7f8fa" placeholder="请输入企业名称检索"
          @search="onSearch" />
        <span style="
          width: 120px;
          height: 40px;
          display: inline-block;
          line-height: 40px;
          text-align: center;
        ">共计：{{ jdfwData.length }}家</span>
      </div>
      <div class="vanpopupCon">
        <ul v-if="jdfwData.length > 0">
          <li v-for="(item, index) in jdfwData" :key="index">
            <!-- <div style="font-size: 20px;font-weight: bold;margin-bottom: 10px;">自建房排查编号{{ item.yhfwbh }}</div> -->
            <van-field readonly placeholder="所属市" v-model="item.cityName" label="所属市" name="pattern" />
            <van-field readonly placeholder="鉴定机构名称" v-model="item.qymc" label="鉴定机构名称" name="pattern" />
            <van-field readonly placeholder="统一社会信用代码" v-model="item.zzjgdm" label="统一社会信用代码" name="pattern" />
            <van-field readonly placeholder="法人" v-model="item.frxm" label="法人" name="pattern" />
            <van-field readonly placeholder="通讯地址" v-model="item.dwdz" label="通讯地址" name="pattern" />
            <van-button type="info" @click="sendShow(item)" style="width: 100%;margin-top: 10px;">选择</van-button>
          </li>
        </ul>
        <div v-else>
          <div style="height: 100%; text-align: center; padding-top: 10vh">
            <div style="margin-bottom: 10px">
              <img src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/DSF/50.png" />
            </div>
            <div>暂无数据</div>
          </div>
        </div>
      </div>
    </van-popup>
  </div>
</template>

<script>
import {
  QuerySignCallback,
  InsertDataView,
  PrepareCreateProcess,
  CreateProcess,
  PlatSendTask,
  getRegister1,
  getRegister,
  getSystemCityCode,
  getDatalistForTree,
  FileServerProxy,
  FileServerUpload,
  dataTransFile,
  dataServerOpenDataView,
  debounce,
  DelectFile,
  GetFileData,
  existHouseBaseInfo,
  dataTransFilePreview,
  getApplyPersonInfoByIdCard,
  getApplyPersonInfoByIdCardV2,
  SaveApplyPersonInfoV2,
  saveApplyPersonInfo,
  appraisal,
  ossUploadFiles,
  dangerHouseRemoldList,
  submitPatrolInfo,
  saveAuthInfo,
  selectTechnicalList,
  numGenerateGetNum,
  getHouseRemoldList,
  savePatrolHouseInfo
} from '@/utils/api'
import { Dialog } from 'vant'
import Pubsub from 'pubsub-js'
import { Toast } from 'vant'
import { v4 as uuidv4 } from 'uuid'
import axios from 'axios'
export default {
  data() {
    let self = this
    return {
      showPickerZZFS: false,
      jdfwData: [

      ],
      QYMC: "",
      showJDFW: false,
      showJDGS: false,
      showDialogWXTS: false,
      KNLX: '',
      isreadonsly1: true,
      isreadonsly2: false,
      showPickerN: false,
      ENUM: {
        SFYF: false,
        KNLX: false,
        SFYFARR: [
          {
            DICNAME: '是',
            DICID: '1'
          },
          {
            DICNAME: '否',
            DICID: '0'
          }
        ]
        // JDLXARR: [],
        // JDLX: false,
        // JDDJARR: [],
        // JDDJ: false,
        // JWFSARR: [],
        // JWFS: false,
        // JWFSName: "",
        // showPickerfk: false,
        // KNLXARR: [],
        // KNLX: false,
        // // IFJDBG:false,
        // // IFJDBGARR:[],
        // JDJG: false,
        // JDJGARR: [],
      },
      listData: [
        // {
        //   name: '房屋照片',
        //   groupGuid: '8188d4d5-0898-44b9-b7f9-4f84dfb58f11',
        //   fileList:[]
        // },
        // {
        //   name: '鉴定报告',
        //   groupGuid: '88d711ba-870c-40f2-a81d-71df8caeefd4',
        //   fileList:[]
        // }
      ],
      yearsToNow: [],
      columnsJWFS: [
        {
          text: '1',
          value: '1'
        }
      ],
      showPickerq: false,
      currentDate: new Date(),
      parentName: '',
      showEdition: false,
      showPickerJFLY: false,
      showPickerJFLY1: false,
      ISshowNow: false,
      phone: window.localStorage.getItem('DanDianPhone') ? self.plusXing(window.localStorage.getItem('DanDianPhone'), 3, 5) : '',
      idCard: window.localStorage.getItem('DanDianid') ? self.plusXing(window.localStorage.getItem('DanDianid'), 6, 8) : '',
      username: '',
      fileList: [],
      fileList1: [],
      tableData1: [],
      tableFrom: {
        XM: '',
        SFZH: '',
        sexx: '',
        phone: '',
        JTZZ: '',
        To_row_guid: ''
      },
      ValueCity: '',
      valueXian: '',
      valueZhen: '',
      valueCun: '',
      buildtype: '',
      If_ljf: '',
      ValueCity3: '',
      valueXian3: '',
      valueZhen3: '',
      valueCun3: '',
      If_ljf1: '',
      nowIndex: 0,
      dialogTitle: '',
      showDialog: false,
      text: '',
      IsLG: '',
      isGOTo1: false,
      // usccName: '',
      removeDangerMode: '',
      formDataNew: {
        isAgent: 0,
        usccName: '',
        removeDangerMode: '',
        agentIdcard: "",   // 代办人身份证号
        agentIdcardEmblem: "",  // 代办人身份证号B(国徽面)  国徽面
        agentIdcardPhoto: "",  // 代办人身份证A(照片)  照片面
        agentName: "",  // 代办人姓名
        agentPhone: "", // 代办人手机号
        applyUser: '',
        applyIdcard: '',
        applyPhone: '',
        // isHasHouse: '',
        cityCode: '',
        detailAddress: '',
        buildFloor: '',
        // buildYear: '',
        uscc: '',
        // objectNo: '',
        birthplace: '',
        belongProvince: '',
        belongCity: '',
        belongCounty: '',
        belongVillage: '',
        belongTown: '',
        dataSource: 2,
        patrolResult: 1,
        propertyPerson: "",
        householderPhone: "",
        householderIdcard: "",
        patrolProcessNode: 1
        // dataSource: ''
      },
      formData: {
        SQR: '',
        ZJH: '',
        SJH: '',
        SCITY: '',
        XCITY: '',
        ZCITY: '',
        CCITY: '',
        KNLX: '',
        CS: '',
        NF: '',
        FWDZ: '',
        DBRXM: '',
        DBRSJH: '',
        DBRZJH: '',
        SQSJ: '',
        JDJG: '',
        TYSHXYDM: '',
        DWDZ: '',
        IFYF: ''
      },
      formDataTR: {
        DBRXM: window.localStorage.getItem('DanDianName') ? self.plusXing(window.localStorage.getItem('DanDianName'), 0, 1) : '',
        DBRSJH: window.localStorage.getItem('DanDianPhone') ? self.plusXing(window.localStorage.getItem('DanDianPhone'), 3, 5) : '',
        DBRZJH: window.localStorage.getItem('DanDianid') ? self.plusXing(window.localStorage.getItem('DanDianid'), 6, 8) : '',
        SQR: '',
        ZJH: '',
        SJH: '',
        SCITY: '',
        XCITY: '',
        ZCITY: '',
        CCITY: '',
        If_ljf: '',
        buildtype: '',
        buildreason: '',
        buildreason_qt: ''
      },
      ISshowNowKNLX: true,
      sendData: [],
      value: '',
      JFLYcolumns: [],
      columns1: ['是', '否'],
      columns2: ['有', '无'],
      showPicker: false,
      tabData: ['本人申请', '为他人代办'],
      tableData: [],
      showPicker1: false,
      CityColumns: [],
      showPickerC: false,
      cityCode: '',
      XianColumns: [],
      showPickerX: false,
      TownColumns: [],
      showPickerT: false,
      CunColumns: [],
      ZZFS: [
        { "name": "维修加固", "value": "维修加固" },
        { "name": "拆除重建", "value": "拆除重建" },
        { "name": "拆除灭失", "value": "拆除灭失" },
        { "name": "拆除安置", "value": "拆除安置" },
        { "name": "置换安置", "value": "置换安置" },
        { "name": "租用安置", "value": "租用安置" },
        { "name": "腾空防控", "value": "腾空防控" },
        { "name": "监控使用", "value": "监控使用" },
      ],
      showPickerCun: false,
      BUILDTYPEcolumns: [],
      showPickerBT: false,
      addNum: 0, //  0本人已提交的，1 他人代办中的
      multipleSelection: [],
      multipleSelection1: [],
      isAdd: true,
      selectDataDisabled: false,
      JDGSData: [
        // {
        //   COMAPNY_NAME: '杭州恒信电气有限公司',
        //   TYSHXYDM: '913301857471537181',
        // },
      ]
    }
  },
  filters: {
    inUseName: function (msg, data) {
      let name = ''
      data.forEach((item) => {
        if (item.DICID == msg) {
          name = item.DICNAME
        }
      })
      return name
    }
  },
  watch: {},
  methods: {
    onConfirmZZFS(val) {
      this.removeDangerMode = val.name
      this.formDataNew.removeDangerMode = val.value
      this.showPickerZZFS = false
    },
    // showPickerC(){
    //   this.showPickerC=true;
    // },
    onSearch() {
      // if(this.QYMC){
      this.getJDFWdata()
      //}
    },
    sendShow(item) {
      console.log(item, 'item')
      debugger
      if (item.hasHouseRemold) {
        this.$toast.fail('您当前选择的件正在走危改流程，请重新选择或者手动填写信息！')
      } else {
        // this.usccName = item.qymc
        this.formDataNew.usccName = item.qymc
        this.formDataNew.uscc = item.zzjgdm

        // this.ValueCity = item.cityName
        // this.formData.SCITY = item.cityCode
        // this.formDataNew.belongCity = item.cityCode
        // this.valueXian = item.countyName
        // this.TownColumns=item.townName;
        // this.formData.XCITY = item.countyCode
        // this.formDataNew.belongCounty = item.countyCode
        // this.valueZhen = item.townName
        // this.formData.ZCITY = item.townCode
        // this.formDataNew.belongTown = item.townCode
        // this.valueCun = item.villageName
        // this.formData.CCITY = item.villageCode
        // this.formDataNew.belongVillage = item.villageCode
        // this.formDataNew.cityCode = item.villageCode
        // this.formDataNew.detailAddress = item.address
        // this.formDataNew.buildFloor = item.cs
        // this.formDataNew.buildYear = item.build_time
        // this.formDataNew.cityCode=item.villageCode
        // this.selectDataDisabled = true
        this.showJDFW = false
      }
    },
    getJDFWdata: async function () {
      let loadingInstance = Toast.loading({
            message: "加载中",
            duration: 0, // toast不消失
            forbidClick: true
        });
      let param = {
        "belongCountryList": [],
        "belongCountyList": this.citycode ? [this.citycode] : [],
        "name": this.QYMC,
        "pageNo": 1,
        "fwlx": "鉴定机构",
        //"qymc": this.QYMC,
        "pageSize": 100000,
        "cityCode": '',
        "token": null
      };
      const res = await selectTechnicalList(param);
      if (res.data && res.data.data && res.data.data.pageList.length > 0) {
        loadingInstance.close()
        this.jdfwData = res.data.data.pageList;
        this.jdfwData.forEach((item, index) => {
          item.checked = false
          this.$forceUpdate()
        })
      } else {
        loadingInstance.close()
        this.jdfwData = [];
      }
      this.showJDFW = true
    },
    searchInformation: async function (data) {
      debugger
      var idcard = ''
      if (this.nowIndex == '0') {
        idcard = window.localStorage.getItem('DanDianid')
      } else {
        idcard = this.formDataNew.applyIdcard
      }
      const res = await getApplyPersonInfoByIdCard(idcard)
      if (res.data.code == '200' && res.data.data.length > 0) {
        this.isData = true
        this.readonly = true
        this.isreadonsly1 = true
        for (let i in this.formDataNew) {
          if (i !== 'applyUser' && i !== 'applyIdcard' && i !== 'applyPhone' && i !== 'agentName' && i !== 'agentPhone' && i !== 'agentIdcard') {
            if (res.data.data[0][i]) {
              this.formDataNew[i] = res.data.data[0][i]
            }
          }
        }
        this.ValueCity = res.data.data[0].belongCity
        this.valueXian = res.data.data[0].belongCountry
        this.valueZhen = res.data.data[0].belongTown
        this.valueCun = res.data.data[0].belongVillage
        this.getJDGSData()
      } else {
        this.isreadonsly1 = false
        this.isData = false
      }
      // this.ValueCity = this.inUseName(this.formData.SCITY, this.CityColumns)
      // this.formData.XCITY = res.data.data[0].belongCounty

      // this.formData.ZCITY = res.data.data[0].belongTown
      // this.ValueCity = this.inUseName(this.formData.SCITY, this.CityColumns)
      // this.formData.CCITY = res.data.data[0].belongVillage
      // this.ValueCity = this.inUseName(this.formData.SCITY, this.CityColumns)
      // if (this.formData.SCITY) {
      //   this.getXianOpenDataView(this.formData.SCITY)
      // }
      // if (this.formData.XCITY) {
      //   this.getTownOpenDataView(this.formData.XCITY)
      // }
      // if (this.formData.ZCITY) {
      //   this.getCunOpenDataView(this.formData.ZCITY)
      // }
      // belongCity
      //   :
      //   "330600000000"
      // belongCounty
      //   :
      //   "330624000000"
      // belongProvince
      //   :
      //   "330000000000"
      // belongTown
      //   :
      //   "330624200000"
      // belongVillage
      //   :
      //   "330624200249"
    },
    // selectAuthenticate() {
    //   let JDData = {
    //     nowIndex: this.nowIndex,
    //     formData: this.formData
    //   }
    //   window.localStorage.setItem('JDData', JSON.stringify(JDData))
    //   this.$router.push({
    //     path: '/authenticateUnitlist',
    //     query: {
    //       data: this.formData,
    //       nowIndex: this.nowIndex,
    //       rowGuid: this.rowGuid
    //     }
    //   })
    // },
    // confirm() {
    //   this.nowIndex = 1
    // },
    inUseName: function (msg, data) {
      let name = ''
      data.forEach((item) => {
        if (item.citycode == msg) {
          name = item.cityname
        }
      })
      return name
    },
    onConfirmN(data) {
      this.formDataNew.buildYear = data
      this.showPickerN = false
    },
    onConfirmSFYF(data) {
      this.formDataNew.isHasHouse = data.DICID
      this.ENUM.SFYF = false
    },
    onConfirmJDGS(data) {
      this.formData.JDJG = data.qymc
      this.formDataNew.uscc = data.zzjgdm
      this.showJDGS = false
    },
    onConfirmKNLX(data) {
      this.formDataNew.userType = data.DICID
      this.ENUM.KNLX = false
    },
    getData: async function () {
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: '0326e06f-4ba2-4361-a7c0-06a55b31708f',
          searchObject: JSON.stringify([{ field: 'row_guid', value: this.rowData.ROW_GUID, operator: '=' }]),
          token: window.localStorage.getItem('token')
        }
      }
      const res = await FileServerProxy(params)
      let data = JSON.parse(res.data.data).Data
      if (data.length > 0) {
        for (let i in this.formData) {
          this.formData[i] = data[0][i]
        }
      }
      if (data.length > 0) {
        this.ROW_GUID = data[0].ROW_GUID
        this.isAdd = false
      } else {
        this.ROW_GUID = this.newGuid()
        this.isAdd = true
      }
    },
    SaveData: async function () {
      debugger
      var _this = this
      var isRules = false
      //判断输入内容是否填写完整
      if (_this.nowIndex == 0) {
        if (
          _this.IsEmpty(_this.formDataNew.applyUser) ||
          _this.IsEmpty(_this.formDataNew.applyIdcard) ||
          _this.IsEmpty(_this.ValueCity) ||
          _this.IsEmpty(_this.valueXian) ||
          _this.IsEmpty(_this.valueZhen) ||
          _this.IsEmpty(_this.valueCun) ||
          _this.IsEmpty(_this.formDataNew.detailAddress) ||
          _this.IsEmpty(_this.formDataNew.usccName) ||
          _this.IsEmpty(_this.removeDangerMode)
        ) {
          isRules = true
        } else {
          isRules = false
        }
      }
      if (_this.nowIndex == 1) {
        if (
          _this.IsEmpty(_this.formDataNew.applyUser) ||
          _this.IsEmpty(_this.formDataNew.applyIdcard) ||
          _this.IsEmpty(_this.ValueCity) ||
          _this.IsEmpty(_this.valueXian) ||
          _this.IsEmpty(_this.TownColumns) ||
          _this.IsEmpty(_this.valueCun) ||
          _this.IsEmpty(_this.formDataNew.detailAddress) ||
          _this.IsEmpty(_this.formDataNew.agentIdcard) ||
          _this.IsEmpty(_this.formDataNew.agentPhone) ||
          _this.IsEmpty(_this.formDataNew.agentName) ||
          _this.IsEmpty(_this.formDataNew.agentIdcardEmblem) ||
          _this.IsEmpty(_this.formDataNew.agentIdcardPhoto)
        ) {
          isRules = true
        } else {
          isRules = false
        }
      }
      if (isRules) {
        this.$toast.fail('请输入必填项！')
      } else {
        if (_this.nowIndex == 0) {
          if (_this.formDataNew.applyUser.indexOf('*') !== -1 || _this.formDataNew.applyIdcard.indexOf('*') !== -1 || _this.formDataNew.applyPhone.indexOf('*') !== -1) {
            _this.formDataNew.applyUser = window.localStorage.getItem('DanDianName')
            _this.formDataNew.applyIdcard = window.localStorage.getItem('DanDianid')
            _this.formDataNew.applyPhone = window.localStorage.getItem('DanDianPhone')
          }
        } else {
          //代办人
          if (_this.formDataNew.agentName.indexOf('*') !== -1 || _this.formDataNew.agentIdcard.indexOf('*') !== -1 || _this.formDataNew.agentPhone.indexOf('*') !== -1) {
            _this.formDataNew.agentName = window.localStorage.getItem('DanDianName')
            _this.formDataNew.agentIdcard = window.localStorage.getItem('DanDianid')
            _this.formDataNew.agentPhone = window.localStorage.getItem('DanDianPhone')
          }
        }
        // if(_this.nowIndex == 0){
        // if (!/^1[3456789]\d{9}$/.test(_this.formDataNew.applyPhone)) {
        //   this.$toast.fail('手机号码不合法，请重新输入')
        //   return false
        // }
        // }

        // if (
        //   !/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
        //     _this.formDataNew.applyIdcard
        //   )
        // ) {
        //   this.$toast.fail('身份证号码不合法，请重新输入')
        //   return false
        // }
        this.formDataNew.buildFloor = Number(this.formDataNew.buildFloor)
        this.formDataNew.propertyPerson = this.formDataNew.applyUser
        this.formDataNew.householderPhone = this.formDataNew.applyPhone
        this.formDataNew.householderIdcard = this.formDataNew.applyIdcard
        this.formDataNew.isAgent = this.nowIndex  //是否代办   默认 0  非代办     1 代办
        const res = await savePatrolHouseInfo(this.formDataNew)
        debugger
        console.log(res, 'res')
        if (res.data.code == 200) {
          this.$router.push({
            path: '/ZLJIndex'
          })
          this.$nextTick(function () {
            this.$toast.success("提交成功!")

          }, 5000)
          // this.$toast({
          //       type: 'success',
          //       message: '提交成功！',
          //       duration: 5000,
          //       onClose: () => {
          //         this.$router.push({
          //           path: '/ZLJIndex'
          //         })
          //       }
          //     })
          // this.$toast({
          //   type: 'success',
          //   message: '提交成功！',
          //   duration: 2000,
          //   onClose: () => {
          //     _this.$router.push({
          //       path: '/ZLJIndex'
          //     })
          //   }
          // })
        } else {
          this.$toast.fail(res.data.msg)
        }
        // if (_this.nowIndex == 1) {
        //   //判断当前农户输入的手机号和代办人的手机号是否一样
        //   if (_this.formDataNew.applyPhone == window.localStorage.getItem('DanDianPhone')) {
        //     this.$toast.fail('农户和代办人的手机号相同，请重新填写')
        //     return false
        //   }
        // }
        //大数据核验
        // if (_this.nowIndex == 1) {
        //   this.handleMatching(_this.formDataNew.agentIdcard, _this.formDataNew.agentName)
        // }else{
        //   this.saveRule();
        // }
      }

      // if (this.formDataNew.propertyPerson && this.formDataNew.householderIdcard) {
      //   this.handleMatching(this.formDataNew.householderIdcard, this.formDataNew.propertyPerson)
      // } else {
      //   this.$toast.fail('请填写户主姓名和身份证号码!')
      //   return false;
      // }

      // if (this.nowIndex == 1) {
      //   if (!this.isGOTo1) {
      //     return false
      //   }
      //   window.localStorage.setItem('citycode', this.formData.CCITY)
      // }

    },
    //保存接口
    saveAuthInfo: async function () {
      var _this = this
      var date = new Date()
      var year = date.getFullYear() //获取当前年份
      let paramBH = {
        appKey: '6738b790-69e8-11ec-a673-6805cab640z1',
        accessCode: 'b03be941dc27498ebcc46311330ee97d',
        keyType: '3',
        numPrefix: 'WGSQ-' + _this.formDataNew.cityCode,
        year: year //当前年份
      }
      const resDataBH = await numGenerateGetNum(paramBH)
      if (resDataBH.data && resDataBH.data.data) {
        _this.formDataNew.checkNumber = resDataBH.data.data
        const savedata = await SaveApplyPersonInfoV2(_this.formDataNew)
        debugger
        if (savedata.data.data) {
          let params1 = {
            objectNo: savedata.data.data
          }
          const res1 = await submitPatrolInfo(params1)
          console.log(res1)
          if (res1.data.data) {
            _this.$toast({
              type: 'success',
              message: '提交成功！',
              duration: 1000,
              onClose: () => {
                _this.$router.push({
                  path: '/ZLJIndex'
                })
              }
            })
          } else {
            _this.$toast.fail(res1.data.msg)
          }
        } else {
          _this.$toast.fail(savedata.data.msg)
        }
      } else {
        _this.$toast.fail('网络不稳定，请稍后重试...')
      }
    },
    StoredProcedure: async function () {
      setTimeout(() => {
        this.$router.push({
          path: '/TreeSelectZLWG',
          query: { data: this.formData, list: false }
        })
      }, 500)
    },
    getList(item) {
      this.groupGuids = item.groupGuid
    },
    afterReadFK(file) {
      // 此时可以自行将文件上传至服务器
      this.getFileServerUpload2(file.file)
    },
    getFileServerUpload2: async function (file) {
      // let formData = new FormData();
      // formData.append("file", file);
      // formData.append("toRowGuid", this.rowGuid);
      // formData.append("groupGuid", this.groupGuids);
      // formData.append("token", window.localStorage.getItem("token"));
      // const res = await FileServerUpload(formData);
      // if (res.data.Success == true) {
      //   this.$notify({ type: "success", message: "上传成功!" });
      // }
      // let data = {
      //   toRowGuid: this.rowGuid,
      //   groupGuid: this.groupGuids,
      //   token: window.localStorage.getItem('token'),
      // }
      // let formData = new FormData()
      // formData.append('file', file)
      // formData.append('accessCode', '7a3fc061c866434b8475d3775c9ddcea')
      // formData.append(
      //   'cityCode',
      //   window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000'
      // )
      // formData.append('token', window.localStorage.getItem('token'))
      // formData.append('paramStr', JSON.stringify(data))
      // const res = await dataTransFile(formData)
      // let data1 = JSON.parse(res.data.data).FileList
      // this.fileGuid = data1[0].FILEGUID
      // if (data1[0].FILEGUID) {
      //   this.$toast.success('上传成功!')
      // }
      let formData = new FormData()
      formData.append('files', file)
      formData.append('path', 'wg')
      formData.append('groupName', '危改身份证反面')
      formData.append('toGroupGuid', '123')
      const res = await ossUploadFiles(formData)
      let data2 = res.data.data
      console.log(data2, 'hezhilong')
      this.formDataNew.agentIdcardEmblem = data2[0].id
      this.fileGuid = data2[0].id
      if (this.fileGuid) {
        this.$toast.success('上传成功!')
      }
    },
    delectFile: async function (file) {
      let fileguid = ''
      if (file.ROW_GUID) {
        fileguid = file.ROW_GUID
      } else {
        fileguid = this.fileGuid
      }
      if (fileguid) {
        let params = {
          accessCode: 'ce9b691634de4ebca68dc5bb638d07f4',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            fileGuid: fileguid,
            token: window.localStorage.getItem('token')
          }
        }
        const res = await FileServerProxy(params)
        let data = JSON.parse(res.data.data).Success
        if (data) {
          this.$toast.success('删除成功!')
        }
      }
    },
    onConfirmJDJG(data) {
      this.formData.JDJG = data.QYZZMC
      this.formData.JDJGFZR = data.ST_NAME
      this.formData.JDJGID = data.ST_ID
      this.ENUM.JDJG = false
    },
    // 枚举
    // getEnumeration: async function () {
    // let params = {
    //   accessCode: "688bd3883572440a859dfd8ba9194e7b",
    //      cityCode: window.localStorage.getItem("citycode")
    // ? window.localStorage.getItem("citycode")
    // : "441300000000",
    //   params: {
    //     dataguid: "b15c9597-ccb8-435c-b43d-06fe30fc0e08",
    //     searchObject: JSON.stringify([]),
    //     token: window.localStorage.getItem("token"),
    //   },
    // };
    // const res = await FileServerProxy(params);
    //this.getEnum('b15c9597-ccb8-435c-b43d-06fe30fc0e08')
    //this.getEnum('c7007467-d12c-4b87-948e-aa58b2df2131')
    // this.getEnum('92f63613-9186-4a84-ba66-d098614e07a6')
    // this.getEnum('86d6eb80-8bcb-49f6-b5c3-462ac1ae585d')
    //this.getEnum('218d5aef-2111-4f82-b435-55ef7bdbd973')
    // this.getEnum('b3be00d8-bd87-4601-8ef0-9b7b0c8929cf')
    // },
    // getEnum: async function (viewID) {
    //   // let token = window.localStorage.getItem("token");
    //   // const res = await dataServerOpenDataView(viewID, [], token);
    //   let params = {
    //     accessCode: '688bd3883572440a859dfd8ba9194e7b',
    //     cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
    //     params: {
    //       dataguid: viewID,
    //       searchObject: JSON.stringify([]),
    //       token: window.localStorage.getItem('token')
    //     }
    //   }
    //   const res = await FileServerProxy(params)
    //   switch (viewID) {
    //     case 'b15c9597-ccb8-435c-b43d-06fe30fc0e08':
    //       this.ENUM.JDLXARR = JSON.parse(res.data.data).Data
    //       break
    //     case 'c7007467-d12c-4b87-948e-aa58b2df2131':
    //       this.ENUM.JDDJARR = JSON.parse(res.data.data).Data
    //       break
    //     case '92f63613-9186-4a84-ba66-d098614e07a6':
    //       this.ENUM.JWFSARR = JSON.parse(res.data.data).Data
    //       break
    //     case '86d6eb80-8bcb-49f6-b5c3-462ac1ae585d':
    //       this.ENUM.KNLXARR = JSON.parse(res.data.data).Data
    //       break
    //     case '218d5aef-2111-4f82-b435-55ef7bdbd973':
    //       this.ENUM.IFJDBGARR = JSON.parse(res.data.data).Data
    //       break
    //     case 'b3be00d8-bd87-4601-8ef0-9b7b0c8929cf':
    //       this.ENUM.JDJGARR = JSON.parse(res.data.data).Data
    //       break
    //     default:
    //       break
    //   }
    // },
    validator(val) {
      var idcardReg = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/
      return idcardReg.test(val)
    },
    afterRead(file) {
      this.getFileServerUpload(file.file, '0')
    },
    plusXing(str, frontLen, endLen) {
      //浙里办新规则
      if (str.length < 9) {
        return '*' + str.substring(1, str.length) //截取name 字符串截取第一个字符
      } else if (str.length > 9 && str.length < 18) {
        return str.substring(0, 3) + '****' + str.substring(7, str.length) //截取第一个和大于第4个字符
      } else {
        return str.substring(0, 1) + '****************' + str.substring(str.length - 1, str.length)
      }
    },
    afterRead1(file) {
      // 此时可以自行将文件上传至服务器
      // this.getFileServerUpload(file.file)
      //   ZWJSBridge.chooseImage({
      //     "upload": true
      //   }).then(res => {
      this.getFileServerUpload(file.file, '1')
      //   }).catch(err => {
      //   })
    },
    getFileServerUpload: async function (file, data) {
      // let data1 = {
      //   toRowGuid: this.rowGuid,
      //   groupGuid: data == '0' ? '19902700-f952-4561-a338-5590056dab65' : 'd26fd8fd-0d8a-46ec-af9f-2341ba78fb58',
      //   token: window.localStorage.getItem('token'),
      // }
      // let formData = new FormData()
      // formData.append('file', file)
      // formData.append('accessCode', '7a3fc061c866434b8475d3775c9ddcea')
      // formData.append(
      //   'cityCode',
      //   window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000'
      // )
      // formData.append('paramStr', JSON.stringify(data1))
      // const res = await dataTransFile(formData)
      // let data2 = JSON.parse(res.data.data).FileList
      // this.fileGuid = data2[0].FILEGUID
      // if (data2[0].FILEGUID) {
      //   this.$toast.success('上传成功!')
      // }
      let formData = new FormData()
      formData.append('files', file)
      formData.append('path', 'wg')
      formData.append('groupName', '危改身份证正面')
      formData.append('toGroupGuid', '123456')
      const res = await ossUploadFiles(formData)
      let data2 = res.data.data
      console.log(data2, 'hezhilong')
      if (data == 0) {
        // this.fileGuid = data2[0].id
        this.formDataNew.agentIdcardPhoto = data2[0].id
      } else {
        // this.fileGuid = data2[0].id
        this.formDataNew.agentIdcardEmblem = data2[0].id
      }
      if (this.formDataNew.agentIdcardEmblem || this.formDataNew.agentIdcardPhoto) {
        this.$toast.success('上传成功!')
      }
    },
    //根据身份证查询户主户籍姓名和身份证匹配
    handleMatching: async function (data, data1) {
      let params = {
        accessCode: '4f54f932615d11ec87416805cab640a0',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: { czrkgmsfhm: data }
      }
      const res = await FileServerProxy(params)
      try {
        if (res.data.data.datas == null) {
          Dialog.confirm({
            message: `通过大数据接口未查到当前填写的申请人姓名和身份证号码,是否继续提交危改申请?`,
          }).then(async () => {
            this.saveRule();


            // let params = this.formDataNew
            // if (!this.isData){
            //   const res = await saveApplyPersonInfo(params)
            //   console.log(res.data.data)
            //   if (res.data.data) {
            //     let params1 = {
            //       objectNo: res.data.data,
            //     }
            //     const res1 = await submitPatrolInfo(params1)
            //     console.log(res1)
            //     if (res1.data.data) {
            //       this.$toast.success('发送成功')
            //       this.$router.push({
            //         path: '/ZLJIndex',
            //       })
            //     } else {
            //       this.$toast.fail(res1.data.msg)
            //     }
            //   }
            // }else{
            //   let param = {
            //     objectNo: this.formDataNew.objectNo,
            //     // userName: "",  // 处理人名称
            //     // userId: "",  // 处理人id
            //     isAuth: '否',
            //     recheck: 0,
            //     // authLevel: '',
            //     authCompanyName: this.formData.JDJG,
            //     socialCreditCode: this.formDataNew.uscc,
            //   }
            //   const res = await saveAuthInfo(param)
            //   if (res.data.data) {
            //     let params1 = {
            //       objectNo: this.formDataNew.objectNo,
            //       userName: window.localStorage.getItem('DanDianName'),
            //       authCompanyName: this.formData.JDJG,
            //       socialCreditCode: this.formDataNew.uscc,
            //       recheck: 0,
            //       token: window.localStorage.getItem('token'),
            //       isAuth: '是',
            //       authLevel: 'D',
            //     }
            //     const res1 = await appraisal(params1)
            //     console.log(res1)
            //     if (res1.data.data) {
            //       this.$toast.success('发送成功')
            //       this.$router.push({
            //         path: '/ZLJIndex',
            //       })
            //     } else {
            //       this.$toast.fail("系统检测到已经有您的危房信息，请联系镇街获取详细信息!")
            //     }
            //   }
            // }
            //_this.saveAuthInfo();
          })
            .catch(() => {

            });
        } else {
          res.data.data.datas.forEach((item) => {
            if (item.ELC_LICENCE_STRUCT.DATA.CZRKGMSFHM == data) {
              if (item.ELC_LICENCE_STRUCT.DATA.CZRKXM == data1) {
                this.isGOTo1 = true
                this.saveRule();
              } else {
                this.$toast.fail('当前填写的代办申请人姓名和身份证号码不匹配!')
                this.isGOTo1 = false
              }
            }
          })
        }
      } catch (err) {
        this.isGOTo1 = true
        // this.$toast.fail('请稍后重试!')
      }
    },
    //保存逻辑
    saveRule: async function () {
      window.localStorage.setItem('citycode', this.formDataNew.cityCode);
      //提交根据户主身份证号判断是否有申请过危改
      //有数据 判断有没有选择鉴定公司，选择了则提示 没有选择 则跳到鉴定公司界面
      const restoListUser = await getApplyPersonInfoByIdCardV2(this.formDataNew.applyIdcard);
      debugger
      if (restoListUser.data && restoListUser.data.data.length > 0) {
        Dialog.confirm({
          message: `系统监测到您已经申请过危房改造,是否继续申请?`,
        }).then(async () => {
          //获取编号
          this.saveAuthInfo();
        })
          .catch(() => {

          });
      } else {
        //没数据
        this.saveAuthInfo();
      }
    },
    //根据身份证信息获取是哪个地市
    handleGetCityData: async function (data) {
      //

      if (this.nowIndex == 0) {
        let params = {
          accessCode: '4f54f932615d11ec87416805cab640a0',
          cityCode: '',

          params: { czrkgmsfhm: this.formDataNew.applyIdcard }
        }
        const res = await FileServerProxy(params)
        // res.data.datas[0].DATA
        // 调用接口获取正确的信息
        if (res.data && res.data.data && res.data.data.datas == null) {
          // this.$toast.fail('非本省人员无法申请建房');
          // this.$notify({ type: 'warning', message: '非本省人员无法申请建房' });
        } else {
          let parmes = {
            accessCode: '3b9bff397b31401ea57b35b384a94673',
            cityCode: '',
            townName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.XZJD,
            fullVillageName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.CZRKZZ,
            townCode: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.SSPCSJGDM,
            villageName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.CJWH
          }
          const res1 = await getSystemCityCode(parmes)
          try {
            res1.data.data.forEach((item) => {
              this.ValueCity3 = item.child[0].pid
              this.ValueCity = item.child[0].cityName
              this.valueXian3 = item.child[0].child[0].pid
              this.valueXian = item.child[0].child[0].cityName
              this.valueZhen3 = item.child[0].child[0].child[0].pid
              this.valueZhen = item.child[0].child[0].child[0].cityName
              this.valueCun3 = item.child[0].child[0].child[0].child[0].pid
              this.valueCun = item.child[0].child[0].child[0].child[0].cityName
            })
          } catch (error) {
            if (this.ValueCity3 == '' || this.valueXian3 == '' || this.valueZhen3 == '' || this.valueCun3 == '') {
              this.$toast.fail('户籍地址和现有地址不匹配,请手动选择！')
              // this.$notify({ type: 'warning', message: '户籍地址和现有地址不匹配,请手动选择！' });
            }
          }
        }
      } else {
        debugger
        let params = {
          accessCode: '4f54f932615d11ec87416805cab640a0',
          cityCode: '',
          params: { czrkgmsfhm: this.formDataNew.applyIdcard }
        }
        const res = await FileServerProxy(params)
        if (res.data && res.data.data && res.data.data.datas) {
          let parmes = {
            accessCode: '',
            cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
            townName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.XZJD,
            fullVillageName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.CZRKZZ,
            townCode: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.SSPCSJGDM,
            villageName: res.data.data.datas[0].ELC_LICENCE_STRUCT.DATA.CJWH
          }
          const res1 = await getSystemCityCode(parmes)
          res1.data.data.forEach((item) => {
            this.ValueCity3 = item.child[0].pid
            this.ValueCity = item.child[0].cityName
            this.valueXian3 = item.child[0].child[0].pid
            this.valueXian = item.child[0].child[0].cityName
            this.valueZhen3 = item.child[0].child[0].child[0].pid
            this.valueZhen = item.child[0].child[0].child[0].cityName
            this.valueCun3 = item.child[0].child[0].child[0].child[0].pid
            this.valueCun = item.child[0].child[0].child[0].child[0].cityName
          })
        }
        // res.data.datas[0].DATA
      }

      //this.getDifficult(this.formDataNew.householderIdcard)
    },
    saveBtn() {
      if (this.tableFrom.XM && this.tableFrom.SFZH && this.tableFrom.phone) {
        if (this.addNum == 0) {
          this.tableData.push(this.tableFrom)
          this.tableData = Array.from(new Set(this.tableData))
        } else {
          this.tableData1.push(this.tableFrom)
          this.tableData1 = Array.from(new Set(this.tableData1))
        }
        this.cancelBtn()
      } else {
        this.$toast.fail('请填写必填项!')
        // this.$notify({ type: 'waring', message: '请填写必填项!' });
      }
    },
    cancelBtn() {
      this.tableFrom = {
        name: '',
        sfzh: '',
        iphone: '',
        jtdz: ''
      }
      this.showDialog = false
    },
    // 保存表格数据
    getCityOpenDataView: async function () {
      this.CityColumns = []
      // let dataGuid = "e9c98787-4966-4365-80b0-c1cc678c6f85";
      // let searchObject = [];
      // let token = window.localStorage.getItem("token");
      // let params = {
      //   accessCode: "688bd3883572440a859dfd8ba9194e7b",

      //   cityCode: window.localStorage.getItem("citycode")
      //     ? window.localStorage.getItem("citycode")
      //     : "441300000000",
      //   params: {
      //     dataguid: dataGuid,
      //     searchObject: searchObject,
      //     token: token,
      //   },
      // };
      const res = await getDatalistForTree('330000000000')
      this.CityColumns = res.data.data
      // debugger
      // this.CityColumns.forEach((item) => {
      //   // if (item.citycode == window.localStorage.getItem('citycode')) {
      //   //   this.cityCode = item.citycode
      //   //   this.ValueCity = item.cityname
      //   //   this.ValueCity1 = item.cityname
      //   //   this.formData.SCITY = item.citycode

      //     // this.formDataTR.S = item.citycode;
      //     // this.formDataGJ.SCITY = item.citycode;
      //     this.showPickerC = false
      //   //}
      // })
      // console.log(this.formData)
      // this.getXianOpenDataView(this.formData.SCITY)
      // if (this.$route.query.data) {
      //   let Base64 = require('js-base64').Base64
      //   let data = JSON.parse(this.$route.query.data)
      //   let cityCode = data.FWTYBH_EXT
      //   this.existHouseBaseInfo = data
      //   // this.formData.SQR = Base64.decode(data.HZXX_INFO.HZXM)
      //   // this.formData.ZJH = Base64.decode(data.HZXX_INFO.HZSFZH)
      //   // this.formData.SJH = Base64.decode(data.HZXX_INFO.HZDH)
      //   this.formData.SQR = this.namePrivate(Base64.decode(data.HZXX_INFO.HZXM))
      //   this.formData.ZJH = Base64.decode(data.HZXX_INFO.HZSFZH).replace(/^(.{6})(?:\d+)(.{4})$/, '$1****$2')
      //   var pho = /(\d{3})\d*(\d{4})/
      //   this.formData.SJH = Base64.decode(data.HZXX_INFO.HZDH).replace(pho, '$1****$2')
      //   this.formData.SCITY = cityCode.substring(0, 4) + '00000000'
      //   this.ValueCity = this.inUseName(this.formData.SCITY, this.CityColumns)
      //   this.formData.XCITY = cityCode.substring(0, 6) + '000000'
      //   this.getXianOpenDataView(this.formData.SCITY)
      //   this.formData.ZCITY = cityCode.substring(0, 9) + '000'
      //   this.getTownOpenDataView(this.formData.XCITY)
      //   this.formData.CCITY = cityCode
      //   this.getCunOpenDataView(this.formData.ZCITY)
      //   this.formData.CS = data.JZCS
      //   this.formData.NF = data.JSNF
      //   this.formData.FWDZ = data.XXDZ
      // } else if (this.$route.query.data2) {
      //   let data = this.$route.query.data2
      //   this.formData.SCITY = this.$route.query.data2.SCITY
      //   this.ValueCity = this.inUseName(this.formData.SCITY, this.CityColumns)
      //   this.formData.XCITY = this.$route.query.data2.XCITY
      //   this.getXianOpenDataView(this.formData.SCITY)
      //   this.formData.ZCITY = this.$route.query.data2.ZCITY
      //   this.getTownOpenDataView(this.formData.XCITY)
      //   this.formData.CCITY = this.$route.query.data2.CCITY
      //   this.getCunOpenDataView(this.formData.ZCITY)
      // } else {
      //   // if (this.formData.ZJH && this.formData.SQR) {
      //   //   this.getNHData()
      //   // }
      // }
    },
    getXianOpenDataView: async function (data) {
      // alert(8)
      debugger
      this.XianColumns = []
      // var p={
      //  "accessCode": "13120772696d11ed8d0f2cf05de0e487",
      //  "cityCode": data,
      //  "params": {
      //  "cityCode": data,
      //  "isLazy":1
      //      }
      //   }
      // const res=await FileServerProxy(p);
      // const JsonData=JSON.parse(res.data.data);
      // if(JsonData.data){
      //   JsonData.data.forEach((item)=>{
      //     var  p={};
      //     p.citycode=item.extraInfo.DEPT_CODE;
      //     p.cityname=item.name;
      //     this.XianColumns.push(p);
      //   })
      // }
      const res = await getDatalistForTree(data)
      this.XianColumns = res.data.data
      if (this.formData.XCITY) {
        if (this.inUseName(this.formData.XCITY, this.XianColumns)) {
          this.valueXian = this.inUseName(this.formData.XCITY, this.XianColumns)
        }
      }
    },
    getTownOpenDataView: async function (data) {
      this.TownColumns = []
      // let dataGuid = "24d07248-ba49-4b82-9029-b5eccaff179d";
      // let searchObject = JSON.stringify([
      //   { field: "pid", value: data, operator: "=" },
      // ]);
      // let token = window.localStorage.getItem("token");
      // let params = {
      //   accessCode: "688bd3883572440a859dfd8ba9194e7b",

      //   cityCode: window.localStorage.getItem("citycode")
      //     ? window.localStorage.getItem("citycode")
      //     : "441300000000",
      //   params: {
      //     dataguid: dataGuid,
      //     searchObject: searchObject,
      //     token: token,
      //   },
      // };
      // var ptown={
      //     "accessCode": "13120772696d11ed8d0f2cf05de0e487",
      //     "cityCode": data,
      //     "params": {
      //     "cityCode": data,
      //     "isLazy":1
      //             }
      //        }
      // const restown=await FileServerProxy(ptown);
      // const JsonDatatown=JSON.parse(restown.data.data);
      // if(JsonDatatown.data){
      //   JsonDatatown.data.forEach((item)=>{
      //     var  p={};
      //     p.citycode=item.extraInfo.DEPT_CODE;
      //     p.cityname=item.name;
      //     this.TownColumns.push(p);
      //   })
      // }
      const res = await getDatalistForTree(data)
      this.TownColumns = res.data.data
      if (this.formData.ZCITY) {
        if (this.inUseName(this.formData.ZCITY, this.TownColumns)) {
          this.valueZhen = this.inUseName(this.formData.ZCITY, this.TownColumns)
        }
      }
    },
    getCunOpenDataView: async function (data) {
      this.CunColumns = []
      // let dataGuid = "d3aaed7c-84ee-4de3-b70e-07fe188cdc8e";
      // let searchObject = JSON.stringify([
      //   { field: "pid", value: data, operator: "=" },
      // ]);
      // let token = window.localStorage.getItem("token");
      // let params = {
      //   accessCode: "688bd3883572440a859dfd8ba9194e7b",

      //   cityCode: window.localStorage.getItem("citycode")
      //     ? window.localStorage.getItem("citycode")
      //     : "441300000000",
      //   params: {
      //     dataguid: dataGuid,
      //     searchObject: searchObject,
      //     token: token,
      //   },
      // };
      // var pCun={
      //     "accessCode": "13120772696d11ed8d0f2cf05de0e487",
      //     "cityCode": data,
      //     "params": {
      //     "cityCode": data,
      //     "isLazy":1
      //             }
      //        }
      // const resCun=await FileServerProxy(pCun);
      // const JsonDataCun=JSON.parse(resCun.data.data);
      // if(JsonDataCun.data){
      //   JsonDataCun.data.forEach((item)=>{
      //     var  p={};
      //     p.citycode=item.extraInfo.DEPT_CODE;
      //     p.cityname=item.name;
      //     this.CunColumns.push(p);
      //   })
      // }
      const res = await getDatalistForTree(data)

      this.CunColumns = res.data.data
      if (this.formData.CCITY) {
        if (this.inUseName(this.formData.CCITY, this.CunColumns)) {
          debugger
          this.valueCun = this.inUseName(this.formData.CCITY, this.CunColumns)
        }
      }
    },
    onConfirmCity(value) {
      this.cityCode = value.citycode
      this.ValueCity = value.cityname
      // this.formData.SCITY = value.citycode
      this.formDataNew.belongCity = value.citycode
      this.showPickerC = false
      this.getXianOpenDataView(value.citycode)
      this.getJDGSData()
    },
    onConfirmXian(value) {
      this.valueXian = value.cityname
      // this.formData.XCITY = value.citycode
      this.formDataNew.belongCounty = value.citycode
      this.showPickerX = false
      this.getTownOpenDataView(value.citycode)
    },
    onConfirmTown(value) {
      this.valueZhen = value.cityname
      // this.formData.ZCITY = value.citycode
      this.formDataNew.belongTown = value.citycode
      this.showPickerT = false
      this.getCunOpenDataView(value.citycode)
    },
    onConfirmCun(value) {
      this.valueCun = value.cityname
      // this.formData.CCITY = value.citycode
      this.formDataNew.belongVillage = value.citycode
      this.formDataNew.cityCode = value.citycode
      this.showPickerCun = false
      // this.formData.cityCode = value.citycode
    },
    onConfirm(value) {
      this.If_ljf = value
      this.formData.If_ljf = value.DICID
      // this.IsLG = value
      this.showPicker = false
    },
    tabClick(index) {
      // if(index==0){
      let self = this
      // if (!this.$route.query.data) {
      //   this.getNHData()
      // }
      this.nowIndex = index
      this.IsLG = ''
      if (index == 1) {
        // agentName:'',
        //   agentPhone:'',
        //   agentIdcard:'',
        //   propertyPerson:'',
        //   householderIdcard:'',
        //   householderPhone:'',
        this.isData = false
          ; (this.isreadonsly1 = false), (this.formDataNew.applyUser = '')
        this.formDataNew.applyIdcard = ''
        this.formDataNew.applyPhone = ''
        this.formDataNew.agentName = window.localStorage.getItem('DanDianName') ? self.plusXing(window.localStorage.getItem('DanDianName'), 0, 1) : ''
        this.formDataNew.agentPhone = window.localStorage.getItem('DanDianPhone') ? self.plusXing(window.localStorage.getItem('DanDianPhone'), 3, 5) : ''
        this.formDataNew.agentIdcard = window.localStorage.getItem('DanDianid') ? self.plusXing(window.localStorage.getItem('DanDianid'), 6, 8) : ''
        // this.ValueCity = ''
        // this.valueXian = ''
        // this.valueZhen = ''
        // this.valueCun = ''
        this.formDataNew.detailAddress = ''
        this.formDataNew.buildFloor = ''
        this.formDataNew.buildYear = ''
      } else {
        //this.searchInformation()
        ; (this.isreadonsly1 = true), (this.formDataNew.agentName = '')
        this.formDataNew.agentPhone = ''
        this.formDataNew.agentIdcard = ''
        this.formDataNew.applyUser = window.localStorage.getItem('DanDianName') ? self.plusXing(window.localStorage.getItem('DanDianName'), 0, 1) : ''
        this.formDataNew.applyIdcard = window.localStorage.getItem('DanDianid') ? self.plusXing(window.localStorage.getItem('DanDianid'), 6, 8) : ''
        this.formDataNew.applyPhone = window.localStorage.getItem('DanDianPhone') ? self.plusXing(window.localStorage.getItem('DanDianPhone'), 3, 5) : ''
      }
    },
    // onConfirmRQ(val) {
    //   let year = val.getFullYear()
    //   let month = val.getMonth() + 1
    //   let day = val.getDate()
    //   let hour = val.getHours()
    //   let minute = val.getMinutes()
    //   if (month >= 1 && month <= 9) {
    //     month = `0${month}`
    //   }
    //   if (day >= 1 && day <= 9) {
    //     day = `0${day}`
    //   }
    //   if (hour >= 0 && hour <= 9) {
    //     hour = `0${hour}`
    //   }
    //   if (minute >= 0 && minute <= 9) {
    //     minute = `0${minute}`
    //   }
    //   this.formData.JDSJ = `${year}-${month}-${day}`
    //   this.showPickerq = false
    // },
    // 获取是否是困难用户
    // getDifficult: async function (data) {
    //   var MD5 = require('../../../utils/md5')
    //   let url = window.g.BaseURL + '/api/farmerHouse/share/getDifficultFamilies'
    //   let param = {
    //     householderName: '',
    //     idCard: data,
    //     type: 0
    //   }
    //   var appkey = '6738c6db-69e8-11ec-a673-6805cab640a0'
    //   var appsecret = '613ea0cb6f9811ed9a386805cab597a8'
    //   var timestamp = Date.now()
    //   var sign = MD5.phex_md5(appkey + appsecret + timestamp)
    //   axios
    //     .post(url, param, {
    //       headers: {
    //         appkey: '6738c6db-69e8-11ec-a673-6805cab640a0',
    //         sign: sign,
    //         timestamp: timestamp
    //       }
    //     })
    //     .then((item) => {
    //       if (item.data.data&&item.data.data.length>0) {
    //         this.formDataNew.userType = '1'
    //         this.KNLX = '是'
    //         //如果是困难家庭就显示国难家庭补助申请
    //         this.ISshowNowKNLX = true
    //       } else {
    //         this.formDataNew.userType = '0'
    //         this.KNLX = '否'
    //         this.ISshowNowKNLX = false
    //       }
    //     })
    //   // let params = {
    //   //   accessCode: '151b9ef2630611ec87416805cab640a0',
    //   //   cityCode: window.localStorage.getItem("citycode") ? window.localStorage.getItem("citycode"):"",
    //   //   params: { hzsfzh: window.localStorage.getItem('DanDianid') || data },
    //   // }
    //   // const res = await FileServerProxy(params)
    //   // if (res.data.data) {
    //   //   this.formDataNew.userType = '1'
    //   //   this.KNLX = '是'
    //   //   //如果是困难家庭就显示国难家庭补助申请
    //   //   this.ISshowNowKNLX = true
    //   // } else {
    //   //   this.formDataNew.userType = '0'
    //   //   this.KNLX = '否'
    //   //   this.ISshowNowKNLX = false
    //   // }
    // },
    getYearsToNow() {
      this.yearsToNow = []
      // this.yearsToNow=[2020,2021,2022]
      //获取到从那一年开始
      let smallYears = 1970
      //获取当前时间
      let date = new Date()
      let nowYears = date.getFullYear()
      let Years = nowYears - smallYears
      let arrYear = []
      for (let i = 0; i <= Years; i++) {
        arrYear.push(nowYears--)
      }
      arrYear.forEach((item) => {
        //下拉框的数组
        this.yearsToNow.push(item)
      })
    },
    // 姓名脱敏
    namePrivate(name) {
      if (null != name && name != undefined) {
        if (name.length == 2) {
          return name.substring(0, 1) + '*' // 截取name的第一个字符，第二个字符变成*
        } else if (name.length == 3) {
          return name.substring(0, 1) + '*' + name.substring(2, 3) // 截取name的第一个和第三个字符，第二个字符变成*
        } else if (name.length > 3) {
          return name.substring(0, 1) + '*' + '*' + name.substring(3, name.length) //截取第一个和大于第4个字符
        }
      } else {
        return ''
      }
    },
    // getNHData: async function () {
    // let Base64 = require('js-base64').Base64
    // let params = 'idCard=' + window.localStorage.getItem('DanDianid') + '&householderName=' + window.localStorage.getItem('DanDianName')
    // const res = await existHouseBaseInfo(params)
    // console.log(res)
    // if (res.data.data) {
    //   //this.formDataNew.isHasHouse = '1'
    //   // if (res.data.data.length == 1) {
    //   //   if (this.formData.ZJH !== Base64.decode(res.data.data[0].HZXX_INFO.HZSFZH)) {
    //   //     this.showDialogWXTS = true
    //   //   }
    //   //   let cityCode = res.data.data[0].FWTYBH_EXT
    //   //   this.existHouseBaseInfo = res.data.data[0]
    //   //   this.formData.SQR = this.namePrivate(Base64.decode(res.data.data[0].HZXX_INFO.HZXM))
    //   //   this.formData.ZJH = Base64.decode(res.data.data[0].HZXX_INFO.HZSFZH).replace(
    //   //     /^(.{6})(?:\d+)(.{4})$/,
    //   //     '$1****$2'
    //   //   )
    //   //   var pho = /(\d{3})\d*(\d{4})/
    //   //   res.data.data[0].HZXX_INFO.HZDH
    //   //
    //   //   this.formData.SJH = Base64.decode(res.data.data[0].HZXX_INFO.HZDH).replace(pho, '$1****$2')
    //   //   this.formData.SCITY = cityCode.substring(0, 4) + '00000000'
    //   //   if (this.inUseName(this.formData.SCITY, this.CityColumns)) {
    //   //     this.ValueCity = this.inUseName(this.formData.SCITY, this.CityColumns)
    //   //   }
    //   //   this.formData.XCITY = cityCode.substring(0, 6) + '000000'
    //   //   this.getXianOpenDataView(this.formData.SCITY)
    //   //
    //   //   this.formData.ZCITY = cityCode.substring(0, 9) + '000'
    //   //   this.getTownOpenDataView(this.formData.XCITY)
    //   //   this.formData.CCITY = cityCode
    //   //   this.getCunOpenDataView(this.formData.ZCITY)
    //   //   this.formData.CS = res.data.data[0].JZCS
    //   //   this.formData.NF = res.data.data[0].JSNF
    //   //   this.formData.FWDZ = res.data.data[0].XXDZ
    //   // } else {
    //   //   this.$router.push({
    //   //     path: '/selectHouse',
    //   //     query: { data: res.data.data },
    //   //   })
    //   // }
    // } else {
    //   //this.formDataNew.isHasHouse = '0'
    // }
    // },
    //获取相关材料1
    // getFile: async function (groupGuid, rowGuid) {
    //   // let groupGuid = [];
    //   // this.fileData.forEach((item) => {
    //   //   groupGuid.push(item.groupGuid);
    //   // });
    //   // const res1 = await GetFileData({
    //   //   groupGuid: groupGuid,
    //   //   toRowGuid: rowGuid,
    //   // });
    //   let params = {
    //     accessCode: '1fdcbce42c6d4748a020feba618d54b8',
    //     cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
    //     params: {
    //       groupGuid: groupGuid,
    //       toRowGuid: rowGuid,
    //       token: window.localStorage.getItem('token')
    //     }
    //   }
    //   const res = await FileServerProxy(params)
    //   let data = JSON.parse(res.data.data).FilesInfo
    //   if (data.length > 0) {
    //     data.forEach((element) => {
    //       // this.fileData.forEach((item) => {
    //       if (element.GROUPGUID == groupGuid) {
    //         this.getFileUrl(element, groupGuid)

    //         // item.fileList.push(element);
    //       }
    //       // });
    //     })
    //   }
    // },
    //获取附件文件流
    // getFileUrl: async function (element, groupGuid) {
    //   let formData = new FormData()
    //   formData.append('accessCode', '98bcf528966e48ce896a8b3fd02d45d5')
    //   formData.append('cityCode', window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000')
    //   formData.append(
    //     'paramStr',
    //     JSON.stringify({
    //       fileGuid: element.ROW_GUID
    //     })
    //   )
    //   console.log(111111)
    //   let response = await dataTransFilePreview(formData)
    //   console.log(response)
    //   if (response) {
    //     var img = new Blob([new Int8Array(response.data, 0)], {
    //       type: response.headers['content-type']
    //     }) //type类型可自定义
    //     element['isImage'] = true
    //     element['url'] = window.URL.createObjectURL(img)
    //     console.log(element)
    //     if (groupGuid == '19902700-f952-4561-a338-5590056dab65') {
    //       // item.fileList.push(element);
    //       this.fileList.push(element)
    //     } else {
    //       this.fileList1.push(element)
    //     }
    //     console.log(this.fileList)
    //     console.log(this.fileList1)
    //   }
    // },
    getJDGSData: async function () {
      debugger
      let param = {
        belongCountryList: [],
        belongCountyList: [],
        name: '',
        pageNo: 1,
        fwlx: "鉴定机构",
        pageSize: 100000,
        token: null
      }
      const res = await selectTechnicalList(param)
      if (res.data && res.data.data && res.data.data.pageList.length > 0) {
        this.JDGSData = res.data.data.pageList
      } else {
        this.JDGSData = []
      }
      // if (this.formData.SCITY) {
      //   var params = {
      //     accessCode: '2caf341e427cb1252dd89c8a7bbf0f75',
      //     cityCode: this.formData.SCITY,
      //     params: {
      //       dataguid: '69f6523e-0a8e-41bc-89f2-48573b917a77',
      //       searchObject: JSON.stringify([
      //         { field: 'FWQY', value: this.formData.SCITY },
      //         { field: 'FWLX', value: 447 },
      //       ]),
      //       token: window.localStorage.getItem('token'),
      //     },
      //   }
      // // } else {
      // //   this.$toast.fail('请选择地市')
      // // }
      // const res = await FileServerProxy(params)
      // if (res.data.data != {}) {
      //   let data = JSON.parse(res.data.data).Data
      //   console.log(data)
      //   this.JDGSData = data
      // } else {
      //   this.JDGSData = []
      // }
    }
  },
  mounted() {
    debugger
    // this.getNHData()
    //this.getDifficult("0");
    let self = this
    // if (this.nowIndex == 0) {
    this.formDataNew.applyUser = window.localStorage.getItem('DanDianName') ? self.plusXing(window.localStorage.getItem('DanDianName'), 0, 1) : ''
    this.formDataNew.applyIdcard = window.localStorage.getItem('DanDianid') ? self.plusXing(window.localStorage.getItem('DanDianid'), 6, 8) : ''
    // this.formDataNew.householderIdcard = '332623197710090010'
    this.formDataNew.applyPhone = window.localStorage.getItem('DanDianPhone') ? self.plusXing(window.localStorage.getItem('DanDianPhone'), 3, 5) : ''
    //this.searchInformation(window.localStorage.getItem('DanDianid'))
    //this.getDifficult(window.localStorage.getItem('DanDianid'))
    // } else {
    //   this.formDataNew.agentName = window.localStorage.getItem('DanDianName') ? self.plusXing(window.localStorage.getItem('DanDianName'), 0, 1) : ''
    //   this.formDataNew.agentPhone = window.localStorage.getItem('DanDianPhone') ? self.plusXing(window.localStorage.getItem('DanDianPhone'), 3, 5) : ''
    //   this.formDataNew.agentIdcard = window.localStorage.getItem('DanDianid') ? self.plusXing(window.localStorage.getItem('DanDianid'), 6, 8) : ''
    // }
    this.showEdition = this.$store.state.Edition
    if (this.showEdition) {
      $('#RebuildPanelV2 .van-field__control').css('fontSize', '16px !important')
      $('#RebuildPanelV2 .van-cell').css('fontSize', '16px !important')
    } else {
      $('#RebuildPanelV2 .van-field__control').css('fontSize', '20px !important')
      $('#RebuildPanelV2 .van-cell').css('fontSize', '20px !important')
    }
    //修改苹果手机头部部分内容被遮盖问题
    var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0
    window.scrollTo(0, Math.max(scrollHeight - 1, 0))
    $('input').on('blur', function () {
      setTimeout(function () {
        var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0
        window.scrollTo(0, Math.max(scrollHeight - 1, 0))
      }, 100)
    })
    // ----------
    // ;
    // debugger
    // if (window.localStorage.getItem('JDData')) {
    //   let JDData = JSON.parse(window.localStorage.getItem('JDData'))
    //   // console.log()
    //   this.nowIndex = JDData.nowIndex
    //   this.formData = JDData.formData
    //   // this.formData.ZCITY = this.$route.query.data2.ZCITY
    //   if (this.formData.SCITY) {
    //     this.getXianOpenDataView(this.formData.SCITY)
    //   }
    //   if (this.formData.XCITY) {
    //     this.getTownOpenDataView(this.formData.XCITY)
    //   }
    //   if (this.formData.ZCITY) {
    //     this.getCunOpenDataView(this.formData.ZCITY)
    //   }
    // }
    //进入页面需要判断困难类型 todo 根据单点登录的身份证号码获取
    // if (this.$route.query.rowGuid) {
    //   this.rowGuid = this.$route.query.rowGuid
    // } else {
    //   this.rowGuid = this.newGuid()
    // }
    // if (this.formData.ZJH) {
    //  // this.getDifficult(this.formData.ZJH)
    // }
    this.getCityOpenDataView()
    // this.getYearsToNow()
    // this.getEnumeration()
    this.showEdition = this.$store.state.Edition
    // this.getJFLYOpenDataView()
    // this.getBUILDTYPEcolumns()
    if (this.showEdition) {
      $('#ApplicationPage .van-field__control').css('fontSize', '16px !important')
      $('#ApplicationPage .van-cell').css('fontSize', '16px !important')
    } else {
      $('#ApplicationPage .van-field__control').css('fontSize', '20px !important')
      $('#ApplicationPage .van-cell').css('fontSize', '20px !important')
    }
    console.log(this.$route.query.data)
    // if (JSON.parse(this.$route.query.data).ROW_GUID){
    //   this.rowGuid = JSON.parse(this.$route.query.data).ROW_GUID
    // }else
    // if (this.$route.query.rowGuid){
    //   this.rowGuid = this.$route.query.rowGuid
    // }else{
    //   this.rowGuid = this.newGuid()
    // }
    if (ZWJSBridge) {
      ZWJSBridge.setTitle({
        title: '危改申请'
      })
        .then((res) => { })
        .catch((err) => { })
    }
  }
}
</script>
<style scoped lang="scss">
#RebuildPanelV2 {
  -webkit-overflow-scrolling: touch;

  /*.van-cell {*/
  /*padding: 10px 0;*/
  /*}*/
  .vanpopupCon {
    padding: 10px;
    overflow-y: auto;
    height: calc(100% - 80px);

    .text {
      line-height: 45px;
      border-bottom: 1px solid #ccc;
    }
  }

  .van-cell {
    padding: 10px 0;
    font-size: 16px;
  }

  .bottomBtn {
    height: 50px;
    background: #007aff;
    line-height: 50px;
    text-align: center;
    color: #ffffff;
    font-weight: bold;
  }

  .bottomText {
    height: 40px;
    line-height: 40px;
    background: #ffffff;
    text-align: center;
  }

  height: 100vh;

  .top {
    height: 90px;
    background: #ffffff;
    padding-top: 25px;
    text-align: center;

    .origin {
      width: 22px;
      height: 22px;
      background: #007aff;
      border-radius: 50%;
      display: inline-block;
    }

    .line {
      width: 20vw;
      /*height: 1px;*/
      border: 1px dashed #007aff;
      display: inline-block;
    }
  }

  .content {
    width: 100%;
    height: calc(100vh - 50px);
    overflow-y: auto;
    background: #ffffff;
    padding: 10px;

    .formStyle {
      display: flex;
      justify-content: center;
      align-items: center;
      border-bottom: 1px solid #d2d2d2;
    }

    .line {
      width: 6px;
      height: 26px;
      background: #007aff;
      display: inline-block;
      margin-right: 10px;
    }

    .list ul li {
      min-height: 50px;
      line-height: 50px;
    }

    .tab {
      height: 40px;
      // border-bottom: 1px solid #9b9b9b;

      ul li {
        width: 50%;
        height: 40px;
        line-height: 35px;
        float: left;
        text-align: center;
      }

      .select {
        color: #3f8ffc;
        border-bottom: 5px solid #3f8ffc;
      }
    }
  }
}
</style>
<style lang="scss">
#RebuildPanelV2 .van-uploader__preview-image {
  width: 180px;
  height: 108px;
}

#RebuildPanelV2 .van-field__label {
  width: 8em !important;
}
</style>
